package com.ruoyi.info.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.info.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/home")
public class HomeController {

    @Autowired
    private HomeService homeService;

    /**
     * 门户网站展示基本信息
     * @return
     */
    @GetMapping("/basicInfo")
    public AjaxResult basicInfo(){
        return AjaxResult.success(homeService.basicInfo());
    };

    /**
     * 行业分布
     * @return
     */
    @GetMapping("/industryInfo")
    public AjaxResult industryInfo(){
        return  AjaxResult.success(homeService.industryDistribution());
    }
    /**
     * 区域分布
     * @return
     */
    @GetMapping("/regionInfo")
    public AjaxResult regionInfo(){
        return AjaxResult.success(homeService.regionDistributio());
    }

    /**
     * 区域分布
     * @return
     */
    @GetMapping("/regionProvinceInfo")
    public AjaxResult regionProvinceInfo(){
        return AjaxResult.success(homeService.regionCodeDistribution());
    }

}
